/* 基础样式 */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2E7D32;
    --accent-color: #8BC34A;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --danger-color: #f44336;
    --success-color: #4CAF50;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Minecraft', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

a {
    text-decoration: none;
    color: var(--dark-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: var(--secondary-color);
}

.btn.secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn.discord {
    background-color: #7289DA;
    color: white;
}

.btn.discord:hover {
    background-color: #5f73bc;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--primary-color);
}

/* 头部样式 */
header {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 50px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
}

.logo h1 span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 600;
    padding: 10px;
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.cta-buttons {
    margin-bottom: 40px;
}

.cta-buttons .btn {
    margin: 0 10px;
}

.server-stats {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.stat {
    margin: 0 30px;
    text-align: center;
}

.stat i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat .count {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.stat .label {
    font-size: 1rem;
}

/* 关于部分样式 */
.about {
    padding: 100px 0;
    background-color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.server-info {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.info-item {
    margin-bottom: 20px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.server-address {
    font-family: monospace;
    font-size: 1.2rem;
    background-color: #e9e9e9;
    padding: 10px;
    border-radius: 5px;
    display: inline-block;
    margin-right: 10px;
}

.copy-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: var(--secondary-color);
}

/* 特色部分样式 */
.features {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* 图库部分样式 */
.gallery {
    padding: 100px 0;
    background-color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

/* 加入部分样式 */
.join {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.join-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.step {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.step h3 {
    text-align: center;
    margin-bottom: 15px;
    margin-top: 10px;
    color: var(--dark-color);
}

.discord-join {
    background-color: #7289DA;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.discord-join h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.discord-join p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* 规则部分样式 */
.rules {
    padding: 100px 0;
    background-color: white;
}

.rules-content {
    max-width: 800px;
    margin: 0 auto;
}

.rule {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.rule:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.rule h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* 联系部分样式 */
.contact {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.contact-item {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-item h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.contact-form button {
    width: 100%;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 70px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 接上文样式 */
.footer-logo img {
    width: 80px;
    margin-bottom: 15px;
}

.footer-logo h2 {
    font-size: 1.5rem;
}

.footer-links h3,
.footer-social h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ddd;
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.social-icons i {
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .server-info {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    header .container {
        padding: 15px;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        transition: all 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
    }
    
    nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    nav ul li a {
        display: block;
        padding: 15px;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .server-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin: 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .join-steps {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content, .section-title, .about-content, 
.features-grid, .gallery-grid, .join-steps, 
.rules-content, .contact-content {
    animation: fadeIn 1s ease;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 公告悬浮窗样式 */
.announcement-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.announcement-content {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideDown 0.5s ease;
}

.announcement-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.announcement-header h3 i {
    margin-right: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

.announcement-body {
    padding: 20px;
}

.announcement-body h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.announcement-body p {
    margin-bottom: 10px;
}

.announcement-body code {
    background-color: #f4f4f4;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.announcement-footer {
    margin-top: 20px;
    text-align: center;
}

/* 动画效果 */
@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 修复移动端标题显示问题 */
@media (max-width: 768px) {
    /* 现有的媒体查询代码 */
    header {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        background-color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }
    
    /* 为了防止内容被固定头部遮挡，给body添加上边距 */
    body {
        padding-top: 70px;
    }
    
    /* 调整hero部分的上边距，确保不会被头部遮挡 */
    .hero {
        padding-top: 30px;
    }
    
    /* 其他现有的媒体查询代码 */
}

/* 添加额外的响应式调整 */
@media (max-width: 576px) {
    /* 现有的媒体查询代码 */
    
    /* 调整移动端的标题大小和间距 */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    /* 调整公告窗口在小屏幕上的样式 */
    .announcement-content {
        max-width: 90%;
    }
    
    /* 其他现有的媒体查询代码 */
}
    }
}

@media (max-width: 768px) {
    header .container {
        padding: 15px;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        transition: all 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
    }
    
    nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    nav ul li a {
        display: block;
        padding: 15px;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .server-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        margin: 0;
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .join-steps {
        grid-template-columns: 1fr;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .announcement-body {
        padding: 15px;
    }
    
    .announcement-body h4 {
        font-size: 1.1rem;
    }
    
    .announcement-body p {
        font-size: 0.9rem;
    }
}